variable "instance_number" {
  description = "The number of instances"
  type        = number
  default     = 1
}

variable "region" {
  description = "The region"
  type        = string
  default     = "cn-hangzhou"
}

variable "zone" {
  description = "可用区"
  type        = string
  default     = "cn-hangzhou-i"
}

variable "key_name" {
  description = "SSH密钥名称"
  type        = string
  default     = "BrianMBP"
}

variable "public_key" {
  description = "公钥"
  type        = string
  default     = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIInjxC9an+ZbVuKtER9t5OF+BgVNNbUGb1cfhfa1Js8t chenliang"
}

variable "vpc_name" {
  description  = "VPC名称"
  type         = string
  default      = "workenv-vpc"
}

variable "vsw_name" {
  description = "交换机名称"
  type        = string
  default     = "workenv-vsw"
}

variable "sg_name" {
  description = "安全组名称"
  type        = string
  default     = "workenv-sg"
}

variable "cidr_block" {
  description = "子网掩码"
  type        = string
  default     = "10.100.1.0/24"
}

variable "instance_type" {
  description = "计算实例规格，默认2c4g"
  type        = string
  default     = "ecs.e-c1m2.large"
}

variable "instance_spot_price_limit" {
  type        = number
  default     = 0.1
  description = "实例折扣率，配合实例规格使用"
}

variable "instance_spot_strategy" {
  type        = string
  default     = "NoSpot"
  description = "即用即付实例的现货策略"
}


variable "instance_name" {
  description = "计算实例名称"
  type        = string
  default     = "tql_prod"
}

variable "resource_group_id" {
  description = "资源组id"
  default = "rg-aek2fdjea64vbdq"
}

variable "image_id" {
  description = "ecs 镜像id,备选 centos_7_7_x64_20G_alibase_20200426.vhd"
  type        = string
  default     = "ubuntu_22_04_x64_20G_alibase_20240419.vhd"
}

variable "instance_password" {
  description = "实例密码"
  type        = string
  sensitive   = true
  default     = ""
}

variable "disk_size" {
  description = "磁盘容量"
  type        = string
  default     = "40"
}

variable "instance_private_ip" {
  description = "实例私有IP"
  type        = string
  default     = ""
}

variable "easp_name" {
  description = "自动快照策略名称"
  type        = string
  default     = "easp-01"
}

variable "easp_repeat_weekdays" {
  description = "自动快照策略重复周期"
  type        = list(string)
  default     = ["1","2","3","4","5","6","7"]
}

variable "easp_time_points" {
  description = "自动快照策略时间点"
  type        = list(string)
  default     = ["19"]
}

variable "easp_retention_days" {
  description = "自动快照策略保留天数"
  type        = number
  default     = 2
}

variable "snapshot_switch" {
  type        = number
  default     = 0
  description = "快照开关，默认为0，不创建快照策略"
}

variable "ansible_application_name" {
  type        = string
  default     = "marketing_admin"
  description = "ansible_application_name"
}

variable "ansible_switch" {
  type        = number
  default     = 0
  description = "ansible开关，默认为0，不创建ansible实例"
}

variable "disk_category" {
  type = string
  default = "cloud_essd"
  description = "云盘类型。hangzhou建议cloud_essd，hongkong建议cloud_efficiency。支持类型 cloud_efficiency：高效云盘。cloud_ssd：SSD云盘。ephemeral_ssd：本地SSD盘。cloud_essd：ESSD云盘。"
}

variable "eip_count" {
  description = "eip数量，默认为0，不申请"
  type        = number
  default     = 0
}

variable "tags_owner" { 
  description = "tag中owner字段值，用于成本分析，勿改"
  type        = string
  default     = "Chenliang"
}

variable "tags_application" {
  description = "tag中application字段值，用于成本分析，勿改"
  type        = string
  default     = "TQL"
}

variable "slb_switch" {
  description = "slb开关，默认为0"
  type        = number
  default     = 0
}

variable "slb_id" {
  description = "slb id"
  type        = string
  default     = "lb-bp1jewa8goqa83y43moub"
}

variable "slb_group_id" {
  description = "已存在的虚拟服务器组id，rsp-开头"
  type        = string
  default     = "rsp-bp1xiiolsztp4"
}

variable "slb_server_attachment_port" {
  description = "加入虚拟服务器组的资源映射端口"
  type        = number
  default     = 8080
}

variable "slb_server_attachment_weight" {
  description = "加入虚拟服务器组的资源权重，最大100"
  type        = number
  default     = 100
}

variable "ansible_commit" {
  type        = string
  default     = "master"
  description = "ansible_commit"
}

variable "ansible_db_address" {
  type        = string
  default     = "rm-bp1w780u0g0f94i9j.mysql.rds.aliyuncs.com:3306"
  description = "ansible_db_address"
}

variable "ansible_db_host" {
  type        = string
  default     = "rm-bp1w780u0g0f94i9j.mysql.rds.aliyuncs.com"
  description = "ansible_db_host"
}

variable "ansible_db_port" {
  type        = string
  default     = "3306"
  description = "ansible_db_port"
}

variable "ansible_db_xxl_job_database" {
  type        = string
  default     = "xxl_job_prod"
  description = "ansible_db_xxl_job_database"
}

variable "ansible_db_username" {
  type        = string
  default     = "tql_prod"
  description = "ansible_db_username"
}

variable "ansible_db_password" {
  type        = string
  default     = "zaq1@WSX"
  description = "ansible_db_password"
}

variable "ansible_db_database" {
  type        = string
  default     = "marketing"
  description = "ansible_db_database"
}

variable "ansible_xxl_job_address" {
  type        = string
  default     = "172.23.18.253:8091"
  description = "ansible_xxl_job_address"
}

variable "ansible_redis_host" {
  type        = string
  default     = "r-bp12cisulgd0odk8k5pi.redis.rds.aliyuncs.com"
  description = "ansible_redis_host"
}

variable "ansible_redis_port" {
  type        = string
  default     = "6379"
  description = "ansible_redis_port"
}

variable "ansible_redis_password" {
  type        = string
  default     = ""
  description = "ansible_redis_password"
}

variable "ansible_redis_username" {
  type        = string
  default     = ""
  description = "ansible_redis_username"
}

variable "ansible_nginx_html_dir" {
  type        = string
  default     = "nginx-docker/html/"
  description = "ansible_nginx_html_dir"
}

variable "ansible_marketing_admin_address" {
  type        = string
  default     = "https://tql-api-dev.see-wonder.com:29000/"
  description = "ansible_marketing_admin_address"
}

variable "ansible_marketing_qw_protal_address" {
  type        = string
  default     = "https://tql-api-dev.see-wonder.com:29030"
  description = "ansible_marketing_qw_protal_address"
}

variable "ansible_oss_dir" {
  type        = string
  default     = "oss://tql-backend-test2"
  description = "ansible_oss_dir"
}

variable "ansible_all_formats_address" {
  type        = string
  default     = "https://tql-api-dev.see-wonder.com:29010/"
  description = "ansible_all_formats_address"
}

variable "ansible_agent_id" {
  type        = string
  default     = "1000119"
  description = "ansible_agent_id"
}

variable "ansible_tql_h5_scrm_address" {
  type        = string
  default     = "https://scrm.tqlscrm.com"
  description = "ansible_tql_h5_scrm_address"
}
variable "ansible_root_key_name" {
  type = string
  default = "tql_prod"
  description = "初始化root用户的权限"
}

variable "ansible_read_key_name" {
  type = string
  default = "tql"
  description = "初始化read用户的权限"
}